3.14.5 \(\int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^3 \, dx\) [1305]

Optimal. Leaf size=214 \[ \frac {d^2 (3 b c-a d) (a+b \tan (e+f x))^{1+m}}{b^2 f (1+m)}+\frac {(i c+d)^3 \, _2F_1\left (1,1+m;2+m;\frac {a+b \tan (e+f x)}{a-i b}\right ) (a+b \tan (e+f x))^{1+m}}{2 (a-i b) f (1+m)}-\frac {(i c-d)^3 \, _2F_1\left (1,1+m;2+m;\frac {a+b \tan (e+f x)}{a+i b}\right ) (a+b \tan (e+f x))^{1+m}}{2 (a+i b) f (1+m)}+\frac {d^3 (a+b \tan (e+f x))^{2+m}}{b^2 f (2+m)} \]

[Out]

d^2*(-a*d+3*b*c)*(a+b*tan(f*x+e))^(1+m)/b^2/f/(1+m)+1/2*(I*c+d)^3*hypergeom([1, 1+m],[2+m],(a+b*tan(f*x+e))/(a
-I*b))*(a+b*tan(f*x+e))^(1+m)/(a-I*b)/f/(1+m)-1/2*(I*c-d)^3*hypergeom([1, 1+m],[2+m],(a+b*tan(f*x+e))/(a+I*b))
*(a+b*tan(f*x+e))^(1+m)/(a+I*b)/f/(1+m)+d^3*(a+b*tan(f*x+e))^(2+m)/b^2/f/(2+m)

________________________________________________________________________________________

Rubi [A]
time = 0.33, antiderivative size = 234, normalized size of antiderivative = 1.09, number of steps used = 7, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3647, 3711, 3620, 3618, 70} \begin {gather*} -\frac {d^2 (a d-b c (2 m+5)) (a+b \tan (e+f x))^{m+1}}{b^2 f (m+1) (m+2)}+\frac {d^2 (c+d \tan (e+f x)) (a+b \tan (e+f x))^{m+1}}{b f (m+2)}+\frac {(c-i d)^3 (a+b \tan (e+f x))^{m+1} \, _2F_1\left (1,m+1;m+2;\frac {a+b \tan (e+f x)}{a-i b}\right )}{2 f (m+1) (b+i a)}-\frac {(-d+i c)^3 (a+b \tan (e+f x))^{m+1} \, _2F_1\left (1,m+1;m+2;\frac {a+b \tan (e+f x)}{a+i b}\right )}{2 f (m+1) (a+i b)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^3,x]

[Out]

-((d^2*(a*d - b*c*(5 + 2*m))*(a + b*Tan[e + f*x])^(1 + m))/(b^2*f*(1 + m)*(2 + m))) + ((c - I*d)^3*Hypergeomet
ric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a - I*b)]*(a + b*Tan[e + f*x])^(1 + m))/(2*(I*a + b)*f*(1 + m))
- ((I*c - d)^3*Hypergeometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a + I*b)]*(a + b*Tan[e + f*x])^(1 + m)
)/(2*(a + I*b)*f*(1 + m)) + (d^2*(a + b*Tan[e + f*x])^(1 + m)*(c + d*Tan[e + f*x]))/(b*f*(2 + m))

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/(b^(
n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 3618

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c*(
d/f), Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 3620

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3647

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si
mp[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Dist[1/(d*(m + n -
1)), Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^n*Simp[a^3*d*(m + n - 1) - b^2*(b*c*(m - 2) + a*d*(
1 + n)) + b*d*(m + n - 1)*(3*a^2 - b^2)*Tan[e + f*x] - b^2*(b*c*(m - 2) - a*d*(3*m + 2*n - 4))*Tan[e + f*x]^2,
 x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
&& IntegerQ[2*m] && GtQ[m, 2] && (GeQ[n, -1] || IntegerQ[m]) &&  !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[c, 0]
&& NeQ[a, 0])))

Rule 3711

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> Simp[C*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f*x])
^m*Simp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0]
&&  !LeQ[m, -1]

Rubi steps

\begin {align*} \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^3 \, dx &=\frac {d^2 (a+b \tan (e+f x))^{1+m} (c+d \tan (e+f x))}{b f (2+m)}+\frac {\int (a+b \tan (e+f x))^m \left (b c^3 (2+m)-d^2 (a d+b c (1+m))+b d \left (3 c^2-d^2\right ) (2+m) \tan (e+f x)-d^2 (a d-b c (5+2 m)) \tan ^2(e+f x)\right ) \, dx}{b (2+m)}\\ &=-\frac {d^2 (a d-b c (5+2 m)) (a+b \tan (e+f x))^{1+m}}{b^2 f (1+m) (2+m)}+\frac {d^2 (a+b \tan (e+f x))^{1+m} (c+d \tan (e+f x))}{b f (2+m)}+\frac {\int (a+b \tan (e+f x))^m \left (b c \left (c^2-3 d^2\right ) (2+m)+b d \left (3 c^2-d^2\right ) (2+m) \tan (e+f x)\right ) \, dx}{b (2+m)}\\ &=-\frac {d^2 (a d-b c (5+2 m)) (a+b \tan (e+f x))^{1+m}}{b^2 f (1+m) (2+m)}+\frac {d^2 (a+b \tan (e+f x))^{1+m} (c+d \tan (e+f x))}{b f (2+m)}+\frac {1}{2} (c-i d)^3 \int (1+i \tan (e+f x)) (a+b \tan (e+f x))^m \, dx+\frac {1}{2} (c+i d)^3 \int (1-i \tan (e+f x)) (a+b \tan (e+f x))^m \, dx\\ &=-\frac {d^2 (a d-b c (5+2 m)) (a+b \tan (e+f x))^{1+m}}{b^2 f (1+m) (2+m)}+\frac {d^2 (a+b \tan (e+f x))^{1+m} (c+d \tan (e+f x))}{b f (2+m)}+\frac {(i c-d)^3 \text {Subst}\left (\int \frac {(a+i b x)^m}{-1+x} \, dx,x,-i \tan (e+f x)\right )}{2 f}-\frac {(i c+d)^3 \text {Subst}\left (\int \frac {(a-i b x)^m}{-1+x} \, dx,x,i \tan (e+f x)\right )}{2 f}\\ &=-\frac {d^2 (a d-b c (5+2 m)) (a+b \tan (e+f x))^{1+m}}{b^2 f (1+m) (2+m)}+\frac {(i c+d)^3 \, _2F_1\left (1,1+m;2+m;\frac {a+b \tan (e+f x)}{a-i b}\right ) (a+b \tan (e+f x))^{1+m}}{2 (a-i b) f (1+m)}-\frac {(i c-d)^3 \, _2F_1\left (1,1+m;2+m;\frac {a+b \tan (e+f x)}{a+i b}\right ) (a+b \tan (e+f x))^{1+m}}{2 (a+i b) f (1+m)}+\frac {d^2 (a+b \tan (e+f x))^{1+m} (c+d \tan (e+f x))}{b f (2+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 2.07, size = 189, normalized size = 0.88 \begin {gather*} \frac {(a+b \tan (e+f x))^{1+m} \left (\frac {2 d^2 (-a d+b c (5+2 m))}{b (1+m)}-\frac {i b (c-i d)^3 (2+m) \, _2F_1\left (1,1+m;2+m;\frac {a+b \tan (e+f x)}{a-i b}\right )}{(a-i b) (1+m)}+\frac {i b (c+i d)^3 (2+m) \, _2F_1\left (1,1+m;2+m;\frac {a+b \tan (e+f x)}{a+i b}\right )}{(a+i b) (1+m)}+2 d^2 (c+d \tan (e+f x))\right )}{2 b f (2+m)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^3,x]

[Out]

((a + b*Tan[e + f*x])^(1 + m)*((2*d^2*(-(a*d) + b*c*(5 + 2*m)))/(b*(1 + m)) - (I*b*(c - I*d)^3*(2 + m)*Hyperge
ometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a - I*b)])/((a - I*b)*(1 + m)) + (I*b*(c + I*d)^3*(2 + m)*Hy
pergeometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a + I*b)])/((a + I*b)*(1 + m)) + 2*d^2*(c + d*Tan[e + f
*x])))/(2*b*f*(2 + m))

________________________________________________________________________________________

Maple [F]
time = 0.22, size = 0, normalized size = 0.00 \[\int \left (a +b \tan \left (f x +e \right )\right )^{m} \left (c +d \tan \left (f x +e \right )\right )^{3}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(f*x+e))^m*(c+d*tan(f*x+e))^3,x)

[Out]

int((a+b*tan(f*x+e))^m*(c+d*tan(f*x+e))^3,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^m*(c+d*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

integrate((d*tan(f*x + e) + c)^3*(b*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^m*(c+d*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

integral((d^3*tan(f*x + e)^3 + 3*c*d^2*tan(f*x + e)^2 + 3*c^2*d*tan(f*x + e) + c^3)*(b*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (e + f x \right )}\right )^{m} \left (c + d \tan {\left (e + f x \right )}\right )^{3}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))**m*(c+d*tan(f*x+e))**3,x)

[Out]

Integral((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**3, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^m*(c+d*tan(f*x+e))^3,x, algorithm="giac")

[Out]

integrate((d*tan(f*x + e) + c)^3*(b*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^m\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^3 \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tan(e + f*x))^m*(c + d*tan(e + f*x))^3,x)

[Out]

int((a + b*tan(e + f*x))^m*(c + d*tan(e + f*x))^3, x)

________________________________________________________________________________________